nagias FAQ
Q. 久しぶりに利用したら、実行してもログイン前に止まってしまい、入力できません
Chrome v.67.0.3396.79をchromedriver v.2.33.506106で動かそうとした
エラー内容
code:python
Traceback (most recent call last):
File "nanaco_auto_fill.py", line 164, in <module>
nanaco.main()
File "nanaco_auto_fill.py", line 108, in main
self.__login()
File "nanaco_auto_fill.py", line 64, in __login
EMAIL.send_keys(self.__CREDENTIALS0) File "/Users/kadoyau/dev/nagias/env/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 352, in send_keys
'value': keys_to_typing(value)})
File "/Users/kadoyau/dev/nagias/env/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 501, in _execute
return self._parent.execute(command, params)
File "/Users/kadoyau/dev/nagias/env/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
self.error_handler.check_response(response)
File "/Users/kadoyau/dev/nagias/env/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'
(Session info: chrome=67.0.3396.79)
(Driver info: chromedriver=2.33.506106 (8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2),platform=Mac OS X 10.13.5 x86_64)
解決策
Chrome Driverが古いので更新してください
Q. Chrome Driverのpermission errorになります
2020-01-24
再現環境
Chrome 79.0.3945.117
ChromeDriver 79.0.3945.36
Python 3.8
解決策
chromedriverにユーザの実行権限を付けてください
code:_
(env) $ chmod u+x chromedriver
(env) $ chromedriver
Starting ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614}) on port 9515
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
エラー内容
code:_
nanaco_auto_fill.py:42: DeprecationWarning: use options instead of chrome_options
return webdriver.Chrome(chrome_options=options)
Traceback (most recent call last):
File "/Users/kadoyau/.ghq/github.com/kadoyau/nagias/env/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/Users/kadoyau/.anyenv/envs/pyenv/versions/3.8.1/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/kadoyau/.anyenv/envs/pyenv/versions/3.8.1/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: Errno 13 Permission denied: 'chromedriver' Q. パスワードを入力しているのにout of rangeエラーが出ます
IDとパスワードをタブ区切りにしていますか?
VS Codeだと、タブがスペースに変換されます
設定でタブを打てるようにしてください
https://gyazo.com/7ac9098de93cf3caeae6785fcbacf1e2